package com.miguo.bean;

import com.miguo.framework.request.JsonData;

import java.io.Serializable;

public class AdvertBean implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;
    private String title;
    private String subject;
    private String item_pic_url;
    private String full_screen_pic_url;
    private String horizontal_pic_url;
    private String content;
    /**
     * 首页广告界面类型(1=专题,2=网页,3=品牌,4=分类,5=预告,6=九块频道)
     */
    private Integer type;
    private Integer position;
    private Integer jump_type;
    private Long start_time;
    private Long end_time;
    private Long edit_time;
    private Integer ordid;
    private Integer status;

    public AdvertBean() {
    }

    public AdvertBean(String title, String item_pic_url) {
        this.title = title;
        this.item_pic_url = item_pic_url;
    }

    public AdvertBean(JsonData ad) {
        id = ad.optLong("id");
        title = ad.optString("title");
        subject = ad.optString("subject");
        item_pic_url = ad.optString("item_pic_url");
        full_screen_pic_url = ad.optString("full_screen_pic_url");
        horizontal_pic_url = ad.optString("horizontal_pic_url");
        content = ad.optString("content");
        type = ad.optInt("type");
        position = ad.optInt("position");
        jump_type = ad.optInt("jump_type");
        start_time = ad.optLong("start_time");
        end_time = ad.optLong("end_time");
        edit_time = System.currentTimeMillis();
        ordid = ad.optInt("ordid");
        status = ad.optInt("status");
    }

    public AdvertBean(Long id, String title, String subject,
                      String item_pic_url, String full_screen_pic_url,
                      String horizontal_pic_url, String content, Integer type,
                      Integer position, Integer jump_type, Long start_time, Long end_time, Long edit_time,
                      Integer ordid, Integer status) {
        this.id = id;
        this.title = title;
        this.subject = subject;
        this.item_pic_url = item_pic_url;
        this.full_screen_pic_url = full_screen_pic_url;
        this.horizontal_pic_url = horizontal_pic_url;
        this.content = content;
        this.type = type;
        this.position = position;
        this.jump_type = jump_type;
        this.start_time = start_time;
        this.end_time = end_time;
        this.edit_time = edit_time;
        this.ordid = ordid;
        this.status = status;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getItem_pic_url() {
        return item_pic_url;
    }

    public void setItem_pic_url(String item_pic_url) {
        this.item_pic_url = item_pic_url;
    }

    public String getFull_screen_pic_url() {
        return full_screen_pic_url;
    }

    public void setFull_screen_pic_url(String full_screen_pic_url) {
        this.full_screen_pic_url = full_screen_pic_url;
    }

    public String getHorizontal_pic_url() {
        return horizontal_pic_url;
    }

    public void setHorizontal_pic_url(String horizontal_pic_url) {
        this.horizontal_pic_url = horizontal_pic_url;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 首页广告界面类型(1=专题,2=网页,3=品牌,4=分类,5=预告,6=九块频道)
     */
    public Integer getType() {
        return type;
    }

    /**
     * 首页广告界面类型(1=专题,2=网页,3=品牌,4=分类,5=预告,6=九块频道)
     */
    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getPosition() {
        return position;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }

    public Integer getJump_type() {
        return jump_type;
    }

    public void setJump_type(Integer jump_type) {
        this.jump_type = jump_type;
    }

    public Long getStart_time() {
        return start_time;
    }

    public void setStart_time(Long start_time) {
        this.start_time = start_time;
    }

    public Long getEnd_time() {
        return end_time;
    }

    public void setEnd_time(Long add_time) {
        this.end_time = add_time;
    }

    public Long getEdit_time() {
        return edit_time;
    }

    public void setEdit_time(Long edit_time) {
        this.edit_time = edit_time;
    }

    public Integer getOrdid() {
        return ordid;
    }

    public void setOrdid(Integer ordid) {
        this.ordid = ordid;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

}
